package com.mud.dnd.domain.model;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;


@Entity
public class Session implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	
	private int id;
	private User user;
	private String sessionID;
	private Date sessionExp;
	
	
	
	
	
	public Session() {
		
	}

	public Session(User user, String sessionID, Date sessionExp) {
		
		this.user = user;
		this.sessionID = sessionID;
		this.sessionExp = sessionExp;
	}
	
	
	@Id
	@GeneratedValue
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	@ManyToOne
	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public String getSessionID() {
		return sessionID;
	}

	public void setSessionID(String sessionID) {
		this.sessionID = sessionID;
	}

	public Date getSessionExp() {
		return sessionExp;
	}

	public void setSessionExp(Date sessionExp) {
		this.sessionExp = sessionExp;
	}

}
